﻿<div class="header-topbar">
    <div class="header-wrap">
        <div class="left-header">
            @using (Html.BeginForm("Index", "Search", FormMethod.Post, new { @class = "form-horizontal" }))
            {
            <div class="kyer-autocomplete search-box">
                <input type="submit" class="btn" value="Tìm" />
                <input type="text" class="txt" id="txtSearchAuto" />
            </div>
            }
            <div class="logo-block">
                <a href="@Url.Action("Index", "Home")">
                    <img src="@Url.Content("~/Content/img/logo.png")" alt="logo" />
                </a>
            </div>
        </div>
        <div class="right-header">
            @if (Session["Username"] != null)
            {
                <div class="profile-acc">
                    <div class="account-name">
                        <a class="user-name" href="#">
                            <em>
                                @Helper.SessionManagement.GetSessionReturnToString("Username")
                            </em>
                            <span class="profile-arrow"></span>
                            <img src="@Url.Content("~/Content/ImgResource/avatar.png")" alt="avatar.png"/>
                        </a>
                        <div class="drop-down-profile">
                            <h3>
                                 @Helper.SessionManagement.GetSessionReturnToString("Email")
                            </h3>
                            <ul class="main-drop-down">
                                <li><a class="user-profile-link" href="@Url.Action("Index", "User")"><span class="icon"></span><span>
                                    Cá nhân</span> </a></li>
                                <li><a class="usercp-link" href="#"><span class="icon"></span><span>UserCP</span>
                                </a></li>
                            </ul>
                            <ul class="second-drop-down">
                                <li><a class="support-link" href="#"><span class="icon"></span><span>Trợ giúp & Hướng
                                    dẫn</span> </a></li>
                                <li><a class="law-link" href="@Url.Action("Policy","Article")"><span class="icon"></span><span>Quy định & Chính sách</span>
                                </a></li>
                                <li><a class="about-link" href="@Url.Action("Login", "Authurization")"><span class="icon"></span><span>Thông tin về 50K</span>
                                </a></li>
                                <li><a class="logout-link" href="@Url.Action("Logout", "Authurization")"><span class="icon"></span><span>Đăng xuất</span>
                                </a></li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="notify-icons-list">
                    <ul>
                        <li><span class="count-notice">10</span> <a class="btn-icon message-icon" href="#"></a>
                            <div class="notice-panel">
                                <h3>
                                    Tin nhắn
                                </h3>
                                <ul>
                                    <!--Tin nhắn-->
                                </ul>
                                <div class="more-notice">
                                    <a href="message.html">Xem tất cả</a>
                                </div>
                            </div>
                        </li>
                        <li><span class="count-notice">20+</span> <a class="btn-icon notify-icon" href="#"></a>
                            <div class="notice-panel">
                                <h3>
                                    Thông báo
                                </h3>
                                <ul>
                                    <!--Thông báo-->
                                </ul>
                                <div class="more-notice">
                                    <a href="#">Xem tất cả</a>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
            }
            else
            {
                var UrlPath = Request.Path.Split('/');
                if (UrlPath.Length > 2)
                {
                    if (UrlPath[2].ToLower() == "register")
                    {
                    
                    <div class="top-login-reg">
                        <span>Bạn đã có tài khoản?</span> <a href="@Url.Action("Login", "Authurization")" class="btn">
                            Đăng nhập</a>
                    </div>            
                    }
                    else
                    {
                    <div class="top-login-reg">
                        <span>Bạn vẫn chưa có tài khoản?</span> <a href="@Url.Action("Register", "Authurization")" class="btn">
                            Đăng ký</a>
                    </div>
                    }
                }
                else
                { 
                <div class="top-login-reg">
                        <span>Bạn đã có tài khoản?</span> <a href="@Url.Action("Login", "Authurization")" class="btn">
                            Đăng nhập</a>
                    </div>
                }
            }
        </div>
    </div>
</div>
